package com.xbongbong.paas.service;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.pro.performance.pojo.dto.PerformanceAggDepartmentDTO;
import com.xbongbong.pro.performance.pojo.dto.PerformanceChartListDTO;
import com.xbongbong.pro.performance.pojo.dto.PerformanceConfigListDTO;
import com.xbongbong.pro.performance.pojo.dto.PerformanceDetailDTO;
import com.xbongbong.pro.performance.pojo.dto.PerformanceEditListDTO;
import com.xbongbong.pro.performance.pojo.dto.PerformanceItemDTO;
import com.xbongbong.pro.performance.pojo.dto.PerformanceListDTO;
import com.xbongbong.pro.performance.pojo.dto.PerformanceSaveAppDTO;
import com.xbongbong.pro.performance.pojo.dto.PerformanceSaveWebDTO;
import com.xbongbong.pro.performance.pojo.dto.PerformanceSumDataDTO;
import com.xbongbong.pro.performance.pojo.vo.PerformanceAggDepartmentVO;
import com.xbongbong.pro.performance.pojo.vo.PerformanceChartListVO;
import com.xbongbong.pro.performance.pojo.vo.PerformanceConfigListVO;
import com.xbongbong.pro.performance.pojo.vo.PerformanceDetailVO;
import com.xbongbong.pro.performance.pojo.vo.PerformanceEditListVO;
import com.xbongbong.pro.performance.pojo.vo.PerformanceItemVO;
import com.xbongbong.pro.performance.pojo.vo.PerformanceListVO;
import com.xbongbong.pro.performance.pojo.vo.PerformanceSaveVO;
import com.xbongbong.pro.performance.pojo.vo.PerformanceSumDataVO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.sys.domain.entity.UserEntity;

/**
 * @description:
 * @Author: hongxiao
 * @date: 2019-01-22 15:15
 */
public interface PerformanceService {
    /**
     * web端获取业绩目标配置
     * 按钮权限列表、财年起始月份、是否开启财年标识、财年周期、当前财年年份
     * @param performanceConfigListDTO 入参
     * @return
     * @throws XbbException
     */
    PerformanceConfigListVO configList(PerformanceConfigListDTO performanceConfigListDTO) throws XbbException;

    /**
     * app端获取业绩目标配置
     * 目标管理、目标完成情况权限list、财年起始月份、当前财年年份、是否开启财年标识
     * @param performanceConfigListDTO 入参
     * @return
     * @throws XbbException
     */
    PerformanceConfigListVO configListForMobile(PerformanceConfigListDTO performanceConfigListDTO) throws XbbException;

    /**
     * 设置目标初始化
     * @param performanceItemDTO 入参
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-02-18 11:22
     * @since v1.0
     * @version v1.0
     */
    PerformanceItemVO item(PerformanceItemDTO performanceItemDTO) throws XbbException;

    /**
     * web-保存业绩目标
     * @param performanceSaveWebDTO 入参
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-02-18 11:36
     * @since v1.0
     * @version v1.0
     */
    PerformanceSaveVO saveWeb(PerformanceSaveWebDTO performanceSaveWebDTO) throws XbbException;

    /**
     * 列表页编辑单个目标
     * @param performanceEditListDTO 入参
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-02-18 11:43
     * @since v1.0
     * @version v1.0
     */
    PerformanceEditListVO editList(PerformanceEditListDTO performanceEditListDTO) throws XbbException;

    /**
     * app-保存业绩目标
     * @param performanceSaveAppDTO 入参
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-02-18 22:32
     * @since
     * @version
     */
    PerformanceSaveVO saveApp(PerformanceSaveAppDTO performanceSaveAppDTO) throws XbbException;

    /**
     * 目标列表
     * @param performanceListDTO 入参
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-02-19 11:12
     * @since v1.0
     * @version v1.0
     */
    PerformanceListVO list(PerformanceListDTO performanceListDTO) throws XbbException;

    /**
     * 目标列表_员工目标汇总
     * @param performanceSumDataDTO 入参
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-02-19 16:16
     * @since v1.0
     * @version v1.0
     */
    PerformanceSumDataVO sumData(PerformanceSumDataDTO performanceSumDataDTO) throws XbbException;

    /**
     * 业绩目标详情
     * @param performanceDetailDTO 入参
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-02-19 19:12
     * @since v1.0
     * @version v1.0
     */
    PerformanceDetailVO detail(PerformanceDetailDTO performanceDetailDTO) throws XbbException;

    /**
     * 一键汇总
     * @param performanceAggDepartmentDTO 入参
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-02-19 21:34
     * @since v1.0
     * @version v1.0
     */
    PerformanceAggDepartmentVO aggDepartment(PerformanceAggDepartmentDTO performanceAggDepartmentDTO) throws XbbException;

    Boolean canSetPerformanceInMobile(UserEntity userEntity);

    /**
     * 处理年目标、上半年目标、下半年目标、季度目标：未设置的求和相应月度目标
     *
     * @param oldTargetObject   原目标
     * @param targetObject      现在要设置的目标
     * @return JSONObject
     * @throws XbbException XbbException
     * @author hongxiao
     * @date 2019-02-18 20:14
     * @version v1.0
     * @since v1.0
     */
    JSONObject dealWithTargetObject(JSONObject oldTargetObject, JSONObject targetObject) throws XbbException;

    /**
     * 目标列表
     * @param performanceChartListDTO 入参
     * @return
     * @throws
     *
     * @author hongxiao
     * @date: 2019-02-19 11:12
     * @since v1.0
     * @version v1.0
     */
    PerformanceChartListVO chartList(PerformanceChartListDTO performanceChartListDTO) throws XbbException;

}
